//
//  RepMasterCell.swift
//  PropertyCommunity
//
//  Created by benwang on 2021/6/28.
//

import UIKit
import SnapKit
import RxSwift
import RxCocoa

class RepairOrderMasterCell: UITableViewCell {

  var disposeBag = DisposeBag()

  lazy var view = R.nib.repairOrderMasterView(owner: self)!

  var transferOrderAction: ControlEvent<Void> {
    return view.transferOrderButton.rx.tap
  }

  override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
    super.init(style: style, reuseIdentifier: reuseIdentifier)

    contentView.backgroundColor = UIColor(hex: 0xFAFAFA)

    contentView.addSubview(view)

    view.snp.makeConstraints { make in
      make.edges.equalToSuperview().inset(UIEdgeInsets(top: 8, left: 0, bottom: 0, right: 0))
    }
  }

  required init?(coder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
  }

  override func prepareForReuse() {
    super.prepareForReuse()
    disposeBag = DisposeBag()
  }

}
